//	--------------------------------------------------------------------
//	Copyright(C) 2006,2007 Zhao Yukun. All rights reserved.
//	This file is a part of the Xeres system.
//	Xeres 2007
//	Contact : xeres.engine@gmail.com
//	$(reservedInfo)
//	$(reservedDeclaration)
//	--------------------------------------------------------------------
///	@file	<ICanvas.h>
///	@path	~/src/graphics/canvas/
///	@date	2007/11/09
///	@desc	DirectX canvas interface.

#pragma once

#include "xeres.h"

#include "object/IObject.h"
#include "object/IVar.h"

namespace xeres {

	// forward
	class RenderContext;
	class IFont;
	class IRenderer;

	/*!
		\class	ICanvas
		\brief	Present a canvas in DirectX environment.
				A canvas should have no depth info, just renders sprites on 3D plane.
				Provides HUD interface or full screen wallpaper or overlays.

		\sa	ICanvasElement
	*/
	class ICanvas : public IObject
	{
	public:

		/// \name Constructor & Destructor
		//@{

		/// \ctor
		ICanvas( void );

		/// \dtor
		virtual ~ICanvas( void );

		//@}

		DECL_IOBJECT_INTERFACE( ICanvas , IObject );

	public:

		/// \name ICanvas Interface
		//@{

		/*!
			\brief		Initialize canvas from renderer.
		*/
		virtual void Initialize( RefWeak<IRenderer> renderer ) = 0;

		/*!
			\brief		Finalize canvas.
		*/
		virtual void Finalize( void ) = 0;

		/*!
			\brief		Render canvas to device.
		*/
		virtual void Render( RenderContext& rc ) = 0;

		//@}
	};

} // namespace xeres
